<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>div盒子</title>
    <style>
        .bg{width:  100%; height: 800px; border: 3px solid red}
        /*盒子的宽度是百分之百表示自适应，和屏幕一样大，高无所谓*/
    </style>
</head>
<body>

<div class="bg"></div>


</body>
</html>